package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TbStationStatusMapper;
import com.ruoyi.system.domain.TbStationStatus;
import com.ruoyi.system.service.ITbStationStatusService;
import com.ruoyi.common.core.text.Convert;

/**
 * 测试站状态Service业务层处理
 * 
 * @author nonghg
 * @date 2022-01-09
 */
@Service
public class TbStationStatusServiceImpl implements ITbStationStatusService 
{
    @Autowired
    private TbStationStatusMapper tbStationStatusMapper;

    /**
     * 查询测试站状态
     * 
     * @param id 测试站状态主键
     * @return 测试站状态
     */
    @Override
    public TbStationStatus selectTbStationStatusById(Long id)
    {
        return tbStationStatusMapper.selectTbStationStatusById(id);
    }

    /**
     * 查询测试站状态列表
     * 
     * @param tbStationStatus 测试站状态
     * @return 测试站状态
     */
    @Override
    public List<TbStationStatus> selectTbStationStatusList(TbStationStatus tbStationStatus)
    {
        return tbStationStatusMapper.selectTbStationStatusList(tbStationStatus);
    }

    /**
     * 新增测试站状态
     * 
     * @param tbStationStatus 测试站状态
     * @return 结果
     */
    @Override
    public int insertTbStationStatus(TbStationStatus tbStationStatus)
    {
        return tbStationStatusMapper.insertTbStationStatus(tbStationStatus);
    }

    /**
     * 修改测试站状态
     * 
     * @param tbStationStatus 测试站状态
     * @return 结果
     */
    @Override
    public int updateTbStationStatus(TbStationStatus tbStationStatus)
    {
        tbStationStatus.setUpdateTime(DateUtils.getNowDate());
        return tbStationStatusMapper.updateTbStationStatus(tbStationStatus);
    }

    /**
     * 批量删除测试站状态
     * 
     * @param ids 需要删除的测试站状态主键
     * @return 结果
     */
    @Override
    public int deleteTbStationStatusByIds(String ids)
    {
        return tbStationStatusMapper.deleteTbStationStatusByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除测试站状态信息
     * 
     * @param id 测试站状态主键
     * @return 结果
     */
    @Override
    public int deleteTbStationStatusById(Long id)
    {
        return tbStationStatusMapper.deleteTbStationStatusById(id);
    }
}
